﻿$(document).ready(function(){
    $("#xy").attr("style","height:100%;padding-left:1%;");
    $("#xy span").children("dl").attr("style","width:31%; float:left;padding:1%");
    $("#xy span").children("dl:nth-child(odd)").attr("style","width:31%; height:auto; float:left; border-top:1px solid lightblue; padding:1%");
    $("#sMemue").parent("div").attr("style","clear:both;margin-top:3px; text-align:center;");
    $("#aspnetForm").submit(function(){
       var iArr= $("#xy input");
       var params="";
       for(var i=0;i<iArr.length;i++)
       {
            if(iArr[i].checked)
            {
                params+=iArr[i].value+",";
            }
       }
       if(params=="")
       {
            alert("你没有选择任何项");
            return false;
       }else
       {
            window.location.href="?pv="+params;
       }
    })
	$("#xy input").click(function(){
		var bl=$(this).attr("checked");
		if(bl)
		{
			$(this).parent("dt").siblings("dd").find("input").attr("checked","checked");
			$(this).parents("dl").children("dt").find("input").attr("checked","checked");
		}else
		{
			$(this).parent("dt").siblings("dd").find("input").attr("checked","");
		}
	})
})